home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: miker3@ix.netcom.com (Mike Rubenstein)
- Newsgroups: comp.lang.c++
- Subject: Re: help
- Date: Wed, 31 Jan 1996 13:44:11 GMT
- Organization: Netcom
- Message-ID: <310f7098.51204736@nntp.ix.netcom.com>
- References: <4emgep$mvh@leol.net-link.net>
- NNTP-Posting-Host: ix-dc6-05.ix.netcom.com
- X-NETCOM-Date: Wed Jan 31 5:44:32 AM PST 1996
- X-Newsreader: Forte Agent .99c/16.141
-
- Rusty <russell@net-link.net> wrote:
-
- > I'm a (very) new C++ programmer, and I can not get the
- > compiler to work. I am using Borland Turbo C ++ 4.5 for Windows,
- > and I am trying to make a very simple program from a
- > teach-your-self book. The program is:
- > -----------
- > main()
- > {
- > printf("Hello, world. \n");
- > }
- >
- > -------------
- > I create a new project, type this in, click the lightning-bolt
- > (make and run program), and it gives me an error message and
- > does not run the program. If you have any idea why this is,
- > or know how to make it work, please tell me via this newsgroup,
- > or preferably E-MAIL. My address is russell@net-link.net .
-
- If your compiler just "gives you an error message," get rid of it and
- get one that tells you something useful when you make an error.
-
- But, I'm quite sure that Turbo C++ does not just "give you an error
- message." It gives you an error message that says something. What it
- says might be useful in tracking down the problem.
-
- The best I can guess is that you are compiling as a windows program.
- printf() is not supported in windows programs and execution does not
- start at main. Change your project settings to compile as a DOS
- application (if possible -- I'm not sure if Turbo C++ supports that)
- or an easywin application (or whatever Borland calls their
- pseudo-standard windows programs). Alternatively, rewrite the program
- as a Windows program.
-
-
- Michael M Rubenstein
-